<extend name="public:base"/>

<block name="left">
    <div class="mark_bar cl">
        <a href="{:url('user/safe/index')}" class="goback fl"><i class="iconfont">&#xe600;</i></a>
        <p>设置提现信息</p>
    </div>
</block>

<block name="main">

    <div class="content">
        <form action="{:url('uc/safe/bank')}" method="post" id="form">

            <div class="form">
                <!--<p class="tc red">银行预留的手机号码必须与注册手机号一致！</p>-->
                <p class="tc red">提现到账信息必须正确无误！</p>
                <p class="slarge tc pt1">{$phone|default=''}</p>
                <p class="pt05"></p>

                <input type="hidden" name="bank_code" id="bankCode">
                <input type="hidden" name="bank_name" id="bankName">
                <!--<input type="hidden" name="borrow_id" value="{$Think.get.borrow_id}">-->
                <!--<input type="hidden" name="debt_id" value="{$Think.get.debt_id}">-->

                <div class="input_form">
                    <div class="input_form_bar">
                        <p>真实姓名</p>
                        <input name="real_name" id="real_name" placeholder="请输入你的真实姓名" type="text"
                               value="{$data.real_name|default=''}"/>
                        <div class="cl"></div>
                    </div>

                    <div class="input_form_bar">
                        <p>提现到账方式</p>
                        <!--<input name="idcard" id="idcard" placeholder="请输入您的身份证号码" type="text" autocomplete="off" value="{$data.idcard|default=''}"/>-->
                        <select name="way" id="way">
                            <option value="">微信</option>
                            <option value="">微信</option>
                            <option value="">微信</option>
                        </select>

                        <div class="cl"></div>
                    </div>

                    <!--<div class="input_form_bar">
                        <p>身份证号</p>
                        <input name="idcard" id="idcard" placeholder="请输入您的身份证号码" type="text" autocomplete="off" value="{$data.idcard|default=''}"/>
                        <div class="cl"></div>
                    </div>-->


                    <div class="input_form_bar">
                        <p>银行卡号</p>
                        <input type="tel" name="card_id" id="card_id" size="19" maxlength="19" placeholder="请输入银行卡号"
                               value="{$data.card_id|default=''}" autocomplete="off"/>
                        <div class="cl"></div>
                    </div>

                    <div class="input_form_bar">
                        <p>开户银行</p>
                        <select id="selectBank">
                            <volist name="bank_list" id="v">
                                <option value="{$v.bank_code}">{$v.bank_name}</option>
                            </volist>
                        </select>
                        <div class="cl"></div>
                    </div>


                </div>
                <div class="wrap">
                    <button class="submit" type="submit">立即设置</button>
                    <div class="cl"></div>
                </div>
            </div>
        </form>
    </div>

    <!--<div class="content">
        <div class="center_link_list">
            <ul>
                <li>
                    <span>真实姓名</span>
                    <i class="small fr a999">
                        *xxxx
                    </i>
                    <div class="cl"></div>
                </li>
                <li>
                    <span>身份证号</span>
                    <i class="small fr a999">xxxxx</i>
                    <div class="cl"></div>
                </li>
            </ul>
        </div>
    </div>-->
</block>

<block name="menu"></block>

<block name="js">

    <script type="text/javascript" src="__JS__/check.js?v={:config('app_ver')}"></script>
    <script type="text/javascript">
        $('#form').submit(function () {
            if (!checkRealname()) return false;
            if (!checkIdcard()) return false;
            if (!checkBankcard()) return false;
            if ($("#bankCode").val().length <= 0) {
                wjtips("请选择开户银行！");
                return false;
            }
            return ajax_post($(this));
        });

        $("#selectBank").each(function () {
            var selected = $(this).find("option:selected");
            $("#bankCode").val(selected.val());
            $("#bankName").val(selected.html());
            $(this).change(function () {
                $("#bankCode").val($(this).val());
                $("#bankName").val($(this).find("option:selected").html());
            });
        })
    </script>

</block>
